

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<script type="text/javascript" src="helpman_topicinit.js"></script>

<title>Profile Structure [Enterprise Architect User Guide]</title>

<meta name="keywords" content="Enterprise Architect, Sparx Systems, UML, UML Profile,UML Profile Structure">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />

<link type="text/css" href="default.css" rel="stylesheet" />
<style type="text/css">
  A, A:Visited
  {
    color: #00F;
  }

  A:Active, A:Hover
  {
    color: #F00;
  }

  OL
  {
    margin: 5px 0 5px 48px;
  }

  UL
  {
    margin-bottom: 3px;
    margin-top: 0;
  }

  #nsr
  {
    background-color: #D4DFFF;
  }

  #nsr A
  {
    text-decoration: none;
  }

  #mainbody
  {
    padding: 8px;
  }

  .p_BodyText
  {
    padding: 5px 0;
  }
</style>



<style type="text/css" media="screen">
  BODY
  {
    background-color: #FFFFFF;
  }

  #nsr
  {
    padding: 6px 6px 0 6px;
    border-bottom: none;
    vertical-align: top;
    z-index: 2;
    visibility: visible;
    left: 0;
    top: 0;
    position: absolute;
  }

  #mainbody
  {
    left: 0;
    top: 0;
    margin: 0;
    position: absolute;
    padding: 10px;
    overflow: auto;
    height: 100%;
    z-index: 1;
    background-repeat: no-repeat;
    background-position: bottom right;
    background-attachment: fixed;
  }
</style>

<style type="text/css" media="print">
  #nsr
  {
    visibility: none;
  }

  #mainbody
  {
    overflow: visible;
  }
</style>
<script type="text/javascript" language="JavaScript" src="nonscroll.js"></script>

</head>
<body scroll="no">

<div id="page">



        <div id="content">
          <div id="content-inner">
          



  
          <div id="nsr">
            <table border="0" cellspacing="0" cellpadding="4" width="100%">
              <tr valign="top">
                <td align="left">
  


                  <p class="p_Heading1"><span class="f_Heading1">Profile Structure</span></p>



  
                </td>
                <td align="right">
                  <a href="introduction.htm" onmouseover="document.images.main.src='button_main_h.gif'" onmouseout="document.images.main.src='button_main.gif'">
                    <img name="main" src="button_main.gif" border=0 alt="Return to Introduction">
                  </a>&nbsp;
    
                  <a href="supportedtags.htm" onmouseover="document.images.prev.src='button_prev_h.gif'" onmouseout="document.images.prev.src='button_prev.gif'">
                    <img name=prev src="button_prev.gif" border=0 alt="Previous page" />
                  </a>&nbsp;
    
    
    
                  <a href="supportedattributes.htm" onmouseover="document.images.next.src='button_next_h.gif'" onmouseout="document.images.next.src='button_next.gif'">
                    <img name=next src="button_next.gif" border=0 alt="Next page" />
                  </a>
    
    
                </td>
              </tr>
            </table>
          </div>
          <div id="mainbody">
  


                <p class="p_BodyText"><span class="f_BodyText">UML Profiles for Enterprise Architect are distributed in XML format. The file has the following format:</span></p>
<p class="p_SubHeadingL1"><span class="f_SubHeadingL1">General Header Details</span></p>
<p class="p_Code"><span class="f_Code">&nbsp;</span></p>
<p class="p_Code"><span class="f_Code">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;</span></p>
<p class="p_Code"><span class="f_Code">&lt;UMLProfile profiletype=&quot;uml2&quot;&gt;</span></p>
<p class="p_Code"><span class="f_Code">  &lt;!--Profile name, version number and general notes --&gt;</span></p>
<p class="p_Code"><span class="f_Code">&lt;Documentation id=&quot;XSDSchema&quot; name=&quot;UML Profile for XSD Schema&quot; version=&quot;1.0&quot; notes=&quot;Defines a set of stereotypes and tagged values for XSD Schemas&quot;/&gt;</span></p>
<p class="p_Code"><span class="f_Code">  &lt;!-- The profile content --&gt;</span></p>
<p class="p_Code"><span class="f_Code">  &lt;Content&gt;</span></p>
<p class="p_Code"><span class="f_Code">&lt;!-- List of stereotypes used in this profile. Can also include tagged values, constraints, metafile and descriptive comments--&gt;</span></p>
<p class="p_Code"><span class="f_Code"> &nbsp;&nbsp; &lt;Stereotypes&gt;</span></p>
<p class="p_SubHeadingL1"><span class="f_SubHeadingL1">Stereotype Definitions</span></p>
<p class="p_BodyText"><span class="f_BodyText">The header is followed by one or more Stereotype definitions; for example:</span></p>
<p class="p_Code"><span class="f_Code">&lt;!-- &laquo;XSDComplexType&raquo; --&gt;</span></p>
<p class="p_Code"><span class="f_Code">&lt;Stereotype name=&quot;XSDComplexType&quot; notes=&quot;ComplexType definition generated in XML Schema&quot;&gt;</span></p>
<p class="p_Code"><span class="f_Code">  &lt;AppliesTo&gt;</span></p>
<p class="p_Code"><span class="f_Code"> &nbsp;&nbsp; &lt;Apply type=&quot;class&quot;/&gt;</span></p>
<p class="p_Code"><span class="f_Code">  &lt;/AppliesTo&gt;</span></p>
<p class="p_Code"><span class="f_Code">  &lt;TaggedValues&gt;</span></p>
<p class="p_Code"><span class="f_Code"> &nbsp;&nbsp; &lt;Tag name=&quot;mixed&quot; description=&quot;URI to unique target namespace&quot;/&gt;</span></p>
<p class="p_Code"><span class="f_Code"> &nbsp;&nbsp; &lt;Tag name=&quot;modelGroup&quot; description=&quot;Default model group used when generating complexType definitions for this Schema&quot; values=&quot;all | sequence | choice&quot; default=&quot;choice&quot;/&gt;</span></p>
<p class="p_Code"><span class="f_Code"> &nbsp;&nbsp; &lt;Tag name=&quot;attributeMapping&quot; description=&quot;Default for generating UML attributes as elements, attributes or both within complexTypes&quot; values=&quot;element | attribute| both&quot; default=&quot;both&quot;/&gt;</span></p>
<p class="p_Code"><span class="f_Code"> &nbsp;&nbsp; &lt;Tag name=&quot;roleMapping&quot; description=&quot;Prefix associated with namespace&quot;/&gt;</span></p>
<p class="p_Code"><span class="f_Code"> &nbsp;&nbsp; &lt;Tag name=&quot;memberNames&quot; description=&quot;Schema version&quot;/&gt;</span></p>
<p class="p_Code"><span class="f_Code">&lt;/TaggedValues&gt;</span></p>
<p class="p_Code"><span class="f_Code">&nbsp;</span></p>
<p class="p_Code"><span class="f_Code">&lt;Constraints&gt;</span></p>
<p class="p_Code"><span class="f_Code"> &nbsp;&nbsp; &lt;Constraint name=&quot;&quot; type=&quot;&quot; notes=&quot;&quot;/&gt;</span></p>
<p class="p_Code"><span class="f_Code">&lt;/Constraints&gt;</span></p>
<p class="p_Code"><span class="f_Code">&lt;/Stereotype&gt;</span></p>
<p class="p_BodyText"><span class="f_BodyText">Note the specification of Stereotype name and notes. Also note the use of Tagged Values to set properties for the Profile element. The Tagged Values can have a default value, can be empty and can specify enableable values. Tagged Values are edited in the </span><span class="f_UIControl">Properties</span><span class="f_BodyText"> window of an element, method, attribute or connector.</span></p>
<p class="p_BodyText"><span class="f_BodyText">You can also specify the default size, default comment and Metafile for drawing an element; see the fragment below:</span></p>
<p class="p_Code"><span class="f_Code">&lt;Stereotype name=&quot;Router&quot; cx=&quot;130&quot; cy=&quot;100&quot; notes=&quot;&quot; metafile=&quot;router.emf&quot;&gt;</span></p>
<p class="p_BodyText"><span class="f_BodyText">In the above example, the metafile shape for this element is specified as </span><span class="f_Code">'router.emf'</span><span class="f_BodyText">; when you load this Profile, the .emf file must be in the same directory as the Profile, otherwise the load fails.</span></p>
<p class="p_BodyText"><span class="f_BodyText">Also note how to specify a default comment for an element. All white space between lines is ignored. To force a line break, use the </span><span class="f_Code">\n</span><span class="f_BodyText"> character. To force tabs, use </span><span class="f_Code">\t</span><span class="f_BodyText">.</span></p>
<p class="p_Code"><span class="f_Code">&lt;Comment&gt;</span></p>
<p class="p_Code"><span class="f_Code"> &nbsp; Some text here about how this works\n\t</span></p>
<p class="p_Code"><span class="f_Code"> &nbsp; with comments being imported from the XML description</span></p>
<p class="p_Code"><span class="f_Code"> &nbsp; in one long row.</span></p>
<p class="p_Code"><span class="f_Code">&lt;/Comment&gt;</span></p>
<p class="p_BodyText"><span class="f_BodyText">The example above would import like this:</span></p>
<p class="p_Code"><span class="f_Code">Some text here about how this works</span></p>
<p class="p_Code"><span class="f_Code"> &nbsp;&nbsp; with comments being imported from the XML description in one long row.</span></p>




            </div>
          </div>
        </div>



</div>


</body>
</html>
